
<script>
	import {commonInit} from './api/home/index.js'
	export default {
		onLaunch: async function() {
			// 初始化
			try {
				const resData = await commonInit({
					version: '1.0.1'
				});
				if (resData.code == 1) {
					this.$store.dispatch('getCommInitInfoAsync', resData.data);
				} else {
					uni.showToast({
						title: '初始化失败',
						icon: 'error'
					});
				}
			} catch (e) {
				throw Error(e);
			}
		},
		onShow: function() {
			
		},
		onHide: function() {
			
		}
	}
</script>

<style lang="scss">
	/*每个页面公共css */
	@import "@/uni_modules/uview-ui/index.scss";
	
	page{
		background-color: #f3f3f3;
	}
</style>
